package SMS.mapper;

import SMS.pojo.Books;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 王天宇
* @description 针对表【books】的数据库操作Mapper
* @createDate 2024-09-16 15:23:09
* @Entity generator.domain.Books
*/
@Mapper
public interface BooksMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Books record);

    int insertSelective(Books record);

    Books selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Books record);

    int updateByPrimaryKey(Books record);

    int getTotalCount();

    List<Books> listBooks(@Param("offset") int offset, @Param("pageSize") int pageSize);

    int countByBookNo(String req);

    int countByBookName(String req);

    List<Books> searchBookByName(@Param("bookName") String name, @Param("offset") int offset, @Param("pageSize") int pageSize);

    List<Books> searchBookByNo(@Param("bookNo") String no,@Param("offset") int offset,@Param("pageSize") int pageSize);
}
